package com.primb.bench.project.home.contract;

import com.primb.baselibs.base.BasePresenter;
import com.primb.bench.project.home.entity.HttpProInfo;
import com.primb.bench.project.home.entity.HttpPromiseEntity;
import com.primb.bench.project.home.entity.LoanCalculateInfoEntity;
import com.primb.bench.project.home.entity.PromiseApplyEntity;

import rx.Observable;

/**
 * Created by Chen on 2017/5/18.
 * 功能描述：
 */

public class PromiseApplyContract {

    public interface View {

        void showError(String msg);

        void showInfo(String avg, String bal);

        void hideInfo();

        void showLoading();

        void hideLoading();

        void showDatePicker(int code); //0 起始  1 终止

        void showCalculateResult(PromiseApplyEntity entity);

        void setResultToCalculate();

        void resetView();

        PromiseApplyEntity getEntity();
    }

    public interface Presenter extends BasePresenter {
        void onViewClick(android.view.View view);

        boolean checkEntityIsNull(PromiseApplyEntity entity);

        void calculateGoodRate(LoanCalculateInfoEntity infoEntity);

        void getPromiseInfo(String custId);
    }

    public interface Model {
        Observable<HttpProInfo> getPromiseInfo(String custId);

        Observable<HttpPromiseEntity> getCalculateGoodRate(LoanCalculateInfoEntity infoEntity);
    }
}